//
//  ZHHomeCollectionViewCell.m
//  Doctor
//
//  Created by liuzhishan on 15/12/15.
//  Copyright © 2015年 shanshan. All rights reserved.
//

#import "ZHHomeCollectionViewCell.h"
#import "ZHHospitalModel.h"


@interface ZHHomeCollectionViewCell ()


@property (nonatomic,retain) UIImageView *titleImage;

@property (nonatomic,retain) UILabel *titleLable;

@end

@implementation ZHHomeCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    
    if (self) {
        
        [self addMychildViews];
        
    }
    
    return self;
}

-(void)addMychildViews
{
    self.titleImage = [[UIImageView alloc]init];
    self.titleImage.image = [UIImage imageNamed:@"home-2"];
    [self.titleImage setMyFramewithX:0 andY:0 andWidth:120 andHeight:120];
    [self.contentView addSubview:self.titleImage];
    
    self.titleLable = [[UILabel alloc]init];
    [self.titleLable setMyFramewithX:0 andY:130 andWidth:120 andHeight:22];
    [self.contentView addSubview:self.titleLable];
    self.titleLable.font = [UIFont systemFontOfSize:16*WIDPro -2];
    self.titleLable.textColor = [UIColor whiteColor];
    self.titleLable.backgroundColor =  [UIColor colorWithRed:138/255.0 green:211/255.0 blue:230/255.0 alpha:0.6];
    self.titleLable.textAlignment = NSTextAlignmentCenter;
    
}


-(void)setModel:(ZHHospitalModel *)model
{
    _model = model;
    self.titleLable.text =model.shopName;
}

@end
